//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.orphan.supplier.vo;

import com.orphan.supplier.po.Goods;
import com.orphan.supplier.po.Tender;
import com.orphan.supplier.po.TenderCall;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class TenderCallVO {
    private String tenderCallNumber;
    private String tenderCallTitle;
    private String tenderContent;
    private String start;
    private String end;
    private List<GoodsVO> goodsVO;

    public TenderCallVO(TenderCall tenderCall) {
        this.tenderCallNumber = tenderCall.getNumber();
        this.tenderCallTitle = tenderCall.getTitle();
        this.tenderContent = tenderCall.getContent();
        this.start = tenderCall.getStart().toString();
        this.end = tenderCall.getEnd().toString();
        this.goodsVO = new ArrayList();
        Iterator var2 = tenderCall.getGoods().iterator();

        while(var2.hasNext()) {
            Goods g = (Goods)var2.next();
            this.goodsVO.add(new GoodsVO(g,this.tenderCallNumber));
        }

    }

    public TenderCallVO() {
    }

    public void setTenderStatus(List<Tender> list) {
        for (int i = 0; i < this.goodsVO.size(); i++) {
            for (int j = 0; j < list.size(); j++) {
                Tender tender = list.get(j);
                if (this.goodsVO.get(i).getGoodsName().equals(tender.getGoods().getName())) {
                    this.goodsVO.get(i).setTenderStatus(tender.getStatus(),tender.getProvidedAmount(),tender.getNumber(),tender.getCall().getNumber(),tender.getPrice());
                }
            }
        }
    }

    public String getTenderCallNumber() {
        return this.tenderCallNumber;
    }

    public String getTenderCallTitle() {
        return this.tenderCallTitle;
    }

    public String getTenderContent() {
        return this.tenderContent;
    }

    public String getStart() {
        return this.start;
    }

    public String getEnd() {
        return this.end;
    }

    public List<GoodsVO> getGoodsVO() {
        return this.goodsVO;
    }

    public void setTenderCallNumber(String tenderCallNumber) {
        this.tenderCallNumber = tenderCallNumber;
    }

    public void setTenderCallTitle(String tenderCallTitle) {
        this.tenderCallTitle = tenderCallTitle;
    }

    public void setTenderContent(String tenderContent) {
        this.tenderContent = tenderContent;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public void setGoodsVO(List<GoodsVO> goodsVO) {
        this.goodsVO = goodsVO;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof TenderCallVO)) {
            return false;
        } else {
            TenderCallVO other = (TenderCallVO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$tenderCallNumber = this.getTenderCallNumber();
                Object other$tenderCallNumber = other.getTenderCallNumber();
                if (this$tenderCallNumber == null) {
                    if (other$tenderCallNumber != null) {
                        return false;
                    }
                } else if (!this$tenderCallNumber.equals(other$tenderCallNumber)) {
                    return false;
                }

                Object this$tenderCallTitle = this.getTenderCallTitle();
                Object other$tenderCallTitle = other.getTenderCallTitle();
                if (this$tenderCallTitle == null) {
                    if (other$tenderCallTitle != null) {
                        return false;
                    }
                } else if (!this$tenderCallTitle.equals(other$tenderCallTitle)) {
                    return false;
                }

                Object this$tenderContent = this.getTenderContent();
                Object other$tenderContent = other.getTenderContent();
                if (this$tenderContent == null) {
                    if (other$tenderContent != null) {
                        return false;
                    }
                } else if (!this$tenderContent.equals(other$tenderContent)) {
                    return false;
                }

                label62: {
                    Object this$start = this.getStart();
                    Object other$start = other.getStart();
                    if (this$start == null) {
                        if (other$start == null) {
                            break label62;
                        }
                    } else if (this$start.equals(other$start)) {
                        break label62;
                    }

                    return false;
                }

                label55: {
                    Object this$end = this.getEnd();
                    Object other$end = other.getEnd();
                    if (this$end == null) {
                        if (other$end == null) {
                            break label55;
                        }
                    } else if (this$end.equals(other$end)) {
                        break label55;
                    }

                    return false;
                }

                Object this$goodsVO = this.getGoodsVO();
                Object other$goodsVO = other.getGoodsVO();
                if (this$goodsVO == null) {
                    if (other$goodsVO != null) {
                        return false;
                    }
                } else if (!this$goodsVO.equals(other$goodsVO)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof TenderCallVO;
    }


    public String toString() {
        String var10000 = this.getTenderCallNumber();
        return "TenderCallVO(tenderCallNumber=" + var10000 + ", tenderCallTitle=" + this.getTenderCallTitle() + ", tenderContent=" + this.getTenderContent() + ", start=" + this.getStart() + ", end=" + this.getEnd() + ", goodsVO=" + this.getGoodsVO() + ")";
    }
}
